//
//  RrgisterViewController.m
//  Homework_11
//
//  Created by 徐昊 on 16/7/28.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "RrgisterViewController.h"

@interface RrgisterViewController ()<UITextFieldDelegate>

@end

@implementation RrgisterViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
/** 点击回车收回键盘 */
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField endEditing:YES];
    return YES;
}

/** 点击屏幕收回键盘 */
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self.view endEditing:YES];
}
- (IBAction)back:(UIButton *)sender {
    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
}
- (IBAction)clickButton:(UIButton *)sender {
    [self dismissViewControllerAnimated:YES completion:^{
        
        
    }];
}
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
    if (textField.tag == 5) {
        UIImageView *i = [self.view viewWithTag:50];
        [i setImage:[UIImage imageNamed:@"111"]];
    }
    if (textField.tag == 6) {
        UIImageView *i = [self.view viewWithTag:60];
        [i setImage:[UIImage imageNamed:@"22"]];
    }
    return YES;
}

- (BOOL)textFieldShouldEndEditing:(UITextField *)textField {
    if (textField.tag == 5) {
        UIImageView *i = [self.view viewWithTag:50];
        [i setImage:[UIImage imageNamed:@"11"]];
    }
    if (textField.tag == 6) {
        UIImageView *i = [self.view viewWithTag:60];
        [i setImage:[UIImage imageNamed:@"222"]];
    }
    return YES;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
